<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" 
	xmlns:s="http://jboss.com/products/seam/taglib" 
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core" 
	xmlns:h="http://java.sun.com/jsf/html" 
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j"
	template="/layout/template.xhtml">

	<ui:define name="navigation">
		<h:outputText value="#{messages['layout.menu.home']}" />
	</ui:define>
	<ui:define name="title">
		<h:outputText value="#{messages['intro-home.xhtml.page.title']}" />
	</ui:define>
	<ui:define name="body">
       	<h:form>
       		<h:commandButton value="export DB" action="#{exportImportAction.exportDB()}" />
       	</h:form>
       	
		<a4j:outputPanel>
			<h:form enctype="multipart/form-data">
				<h:panelGrid columns="2" width="100%" cellpadding="10px">
					<s:fileUpload data="#{exportImportAction.uploadedData}" accept="text/csv, text/text" required="true"/>
				</h:panelGrid>
				<s:div>
					<h:commandLink reRender="productTable,jQueryPanel" action="#{exportImportAction.importDB()}">
							<h:outputText value="Import data" />
					</h:commandLink>
				</s:div>
			</h:form>
		
		</a4j:outputPanel>
	</ui:define>

</ui:composition>
